package com.alibaba.system.mapper;

import com.alibaba.basic.mapper.BaseMapper;
import com.alibaba.system.domain.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author itsource
 * @since 2023-03-09
 */
public interface PermissionMapper extends BaseMapper<Permission> {

    Permission findBySn(String permissionSn);

    void addMiddle(@Param("roleId") Long id, @Param("permission") List<Long> menus);

    void deleteByRoleId(Long id);

    List<String> findByLogininfoId(Long id);

    //
    List<String> loadOwnPermissionByLogininId(Long id);
}
